package com.bdqn.crm.mapper;

import com.alibaba.druid.sql.visitor.functions.Right;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bdqn.crm.pojo.SysRight;
import com.bdqn.crm.pojo.SysRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Entity com.bdqn.crm.pojo.SysRole
 */
public interface SysRoleMapper extends BaseMapper<SysRole> {

    /**
     * 角色增删改查
     * @return
     */
    List<SysRole> findAllRoles();

    /**
     * 权限查询
     * @return
     */
    List<SysRight> findAllRights();
    List<SysRight> findRightsByRole(@Param("roler") SysRole role);


    List<SysRole> selectPages(@Param("roleName")String roleName,@Param("pageIndex") Integer pageIndex,@Param("pageSize") Integer pageSize);


    Integer saveRole(@Param("sysrole") SysRole sysRole);
}




